import { Column, Entity } from 'typeorm';
import { BaseEntity } from './BaseEntity';
@Entity()
export class SysFile extends BaseEntity {
  @Column({
    type: 'varchar',
    comment: '文件名称'
  })
  name?: string;

  @Column({
    type: 'varchar',
    comment: '文件类型 '
  })
  type?: string;

  @Column({
    type: 'int',
    nullable: true,
    comment: '文件大小'
  })
  size?: number;

  @Column({
    type: 'varchar',
    comment: '文件资源路径'
  })
  path?: string;

  @Column({
    type: 'varchar',
    nullable: true,
    comment: '是否是同一文件标识'
  })
  etag?: string;

  @Column({
    type: 'varchar',
    nullable: true,
    comment: '文件content_type',
    name: 'content_type'
  })
  contentType?: string;

  @Column({
    type: 'varchar',
    nullable: true,
    default: 'direct',
    comment: '上次模式'
  })
  mode?: string;

  @Column({
    type: 'varchar',
    nullable: true,
    default: 'success',
    comment: '当前上次文件状态'
  })
  status?: string;

  @Column({
    type: 'int',
    nullable: true,
    default: 0,
    comment: '当前断点续传片数'
  })
  cut?: number;
}
